package com.sihuatech.coreagent.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.google.common.collect.Maps;
import com.sihuatech.coreagent.core.communication.entity.User;
import com.sihuatech.coreagent.mapper.UserMapper;

@Service
public class UserService {
 
	@Autowired
	private UserMapper userMapper;

	
	public User getUser(String userName) {
		Map<String, Object> columnMap = Maps.newHashMap();
		columnMap.put("user_name", userName);
		List<User> list = userMapper.selectByMap(columnMap);
		return list.get(0);
		//return userMapper.getUserByUserName(userName);
	}
}
